//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    class ChartsheetView: IOfficeXmlSerializable
    {
        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (ReadContext c = context.Read("sheetView"))
            {

                TabSelected = c.GetOptionalBoolean("tabSelected", false);
                ZoomScale = c.GetOptionalInteger("zoomScale", 100);
                WorkbookViewId = c.GetInteger("workbookViewId");
                ZoomToFit = c.GetOptionalBoolean("zoomToFit", false);
                Extension = c.ReadOptionalElement<ExtensionElement>("extLst");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("sheetView"))
            {

                c.SetOptionalBoolean("tabSelected", TabSelected, false);
                c.SetOptionalInteger("zoomScale", ZoomScale, 100);
                c.SetInteger("workbookViewId", WorkbookViewId);
                c.SetOptionalBoolean("zoomToFit", ZoomToFit, false);
                c.WriteOptionalElement(Extension);
            }
        }

        #endregion
        private bool _tabSelected;

        public bool TabSelected
        {
            get { return _tabSelected; }
            set { _tabSelected = value; }
        }
        private int _zoomScale = 100;

        public int ZoomScale
        {
            get { return _zoomScale; }
            set { _zoomScale = value; }
        }
        private int _workbookViewId;

        public int WorkbookViewId
        {
            get { return _workbookViewId; }
            set { _workbookViewId = value; }
        }
        private bool _zoomToFit;

        public bool ZoomToFit
        {
            get { return _zoomToFit; }
            set { _zoomToFit = value; }
        }
        private ExtensionElement _extLst;

        public ExtensionElement Extension
        {
            get { return _extLst; }
            set { _extLst = value; }
        }
	
	
	
	
	
    }
}
